package com.example.loginjwtdemo.util;

public class JwtUserHolder {

    private static final ThreadLocal<String> name = new ThreadLocal<>();

    public static void add(String username){
        name.set(username);
    }
    public static void remove(){
        name.remove();
    }

    public static String getCurrentUsername(){
        return name.get();
    }
}
